﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Media.Imaging;

namespace Site
{
    public partial class Menu : UserControl
    {
        public string Logo
        { get; set; }

        public Menu()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(Menu_Loaded);
            
        }

        void Menu_Loaded(object sender, RoutedEventArgs e)
        {
            if (Logo == "1")
            {
                BitmapImage bitImg = new BitmapImage();
                bitImg.UriSource = new Uri("/images/logo1.png", UriKind.Relative);
                this.imgLogo.Source = bitImg;
            }
        }

        private void lnkHome_Click(object sender, RoutedEventArgs e)
        {
            App app =(App) Application.Current;
            app.RedirectTo(new Home());            
        }

        private void lnkAbout_Click(object sender, RoutedEventArgs e)
        {
            App app = (App)Application.Current;
            app.RedirectTo(new About());
        }

        private void lnkNews_Click(object sender, RoutedEventArgs e)
        {
            App app = (App)Application.Current;
            app.RedirectTo(new News());
        }

        private void lnkTech_Click(object sender, RoutedEventArgs e)
        {
            App app = (App)Application.Current;
            app.RedirectTo(new Technology());
        }

        private void lnkSolution_Click(object sender, RoutedEventArgs e)
        {
            App app = (App)Application.Current;
            app.RedirectTo(new Solution());
        }

        private void UService_Click(object sender, RoutedEventArgs e)
        {
            App app = (App)Application.Current;
            app.RedirectTo(new UService());
        }

        private void lnkSupplier_Click(object sender, RoutedEventArgs e)
        {
            App app = (App)Application.Current;
            app.RedirectTo(new Supplier());
        }

        private void lnkContact_Click(object sender, RoutedEventArgs e)
        {
            App app = (App)Application.Current;
            app.RedirectTo(new Contact());
        }

        private void lnkProduct_Click(object sender, RoutedEventArgs e)
        {
            App app = (App)Application.Current;
            app.RedirectTo(new Product());
        }

        private void lnkAgent_Click(object sender, RoutedEventArgs e)
        {
            App app = (App)Application.Current;
            app.RedirectTo(new Agent());
        }
    }
}
